<include file="Public:header"/>
<style type="text/css">
.form_data .Validform_checktip{
	margin-left: 0px;
	height: auto;
}
</style>
<form action="" method="post" class="ajax-form">
<div class="form_data">
<volist name="list" id="rs">
	<neq name="rs.label" value="">
	<div class="mod_name">
		<span class="name">{$rs['label']}</span>
		<neq name="rs.opt" value="">
		<div class="opt">
			<a href="{$rs['opt']['url']}" target="_blank">{$rs['opt']['name']}</a>
		</div>
		</neq>
	</div>
	</neq>
	<div class="mod_data">
		<div class="name">{$rs['title']}</div>
		<div class="input_data">
			<switch name="rs.val_type" >
				<case value="text">
					<input type="text" name="{$rs['name']}" value="{$rs['val']}">
				</case>
				<case value="password">
					<input type="password" name="{$rs['name']}" value="{$rs['val']}">
				</case>
				<case value="textarea">
					<textarea name="{$rs['name']}" class="w300 h100" style="{$rs['style']}">{$rs['val']}</textarea><br>
				</case>
				<case value="radio">
					<eq name="rs.val_content" value="">
						<label>
							<input type="radio" class="radio" name="{$rs['name']}" value="1" <eq name="rs.val" value="1">checked</eq>>是
						</label>
						<label>
							<input type="radio" class="radio" name="{$rs['name']}" value="0" <eq name="rs.val" value="0">checked</eq>>否
						</label>
					<else/>
						<php>
							$lidata = explode('||' , $rs['val_content']);
						</php>
						<volist name="lidata" id="row">
							<php>$key_name = explode("=" , $row);</php>
							<label>
								<input type="radio" class="radio" name="{$rs['name']}" value="{$key_name[0]}" <eq name="rs.val" value="$key_name[0]">checked</eq>>{$key_name[1]}
							</label>
						</volist>
					</eq>
				</case>
				<case value="select">
					<select name="{$rs['name']}">
						<php>
							$lidata = explode('||' , $rs['val_content']);
						</php>
						<volist name="lidata" id="row">
							<php>$key_name = explode("=" , $row);</php>
							<option value="{$key_name[0]}" <eq name="rs.val" value="$key_name[0]">selected</eq>>{$key_name[1]}</option>
						</volist>
					</select>
				</case>
				<case value="category_select">
					<select name="{$rs['name']}">
						<php>
							$lidata = D('Category')->get_list($rs['val_content']);
						</php>
						<option value="0">请选择</option>
						<volist name="lidata" id="row">
							<option value="{$row['id']}" <eq name="rs.val" value="$row['id']">selected</eq>>{$row['title']}</option>
						</volist>
					</select>
				</case>
				<case value="checkbox">
					<php>
						$lidata = explode('||' , $rs['val_content']);
					</php>
					<volist name="lidata" id="row">
						<php>
							$checked  = false;
							$key_name = explode("=", $row);
							$val_arr  = explode(",", $rs['val']);
							if(in_array($key_name[0], $val_arr)){
								$checked = true;
							}
						</php>
						<label><input type="checkbox" class="checkbox" name="{$rs['name']}[]" value="{$key_name[0]}" <eq name="checked" value="1">checked</eq>>{$key_name[1]}</label>
					</volist>
				</case>
				<case value="file">
					{:W('Plugin/upload_file', array($rs['name'], 'img', $rs['title'], '', 0, $rs['file_ext'], 0, $rs['val']))}

				</case>
				<default />
					<input type="text" name="{$rs['name']}" value="{$rs['val']}" >
			</switch>
			<span class="Validform_checktip">{$rs['description']}</span>
		</div>
	</div>
</volist>

	<div class="mod_submit">
		<input type="hidden" name="id" value="{$info['id']}">
		<button type="submit" class="btn btn-save">保存</button>
		<button type="reset" class="btn btn-reset">重置</button>
	</div>
</div>
</form>
<include file="Public:footer"/>